// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
const apiPrefix = '/web';

/** 获取电站分区列表 获取电站分区列表 GET /v1/station-areas */
export async function stationAreaControllerImplListStationArea(options?: { [key: string]: any }) {
  return request<API.ApiResultListStationAreaDTO>(`${apiPrefix}/v1/station-areas`, {
    method: 'GET',
    ...(options || {}),
  });
}

/** 新增电站分区 新增电站分区 POST /v1/station-areas */
export async function stationAreaControllerImplAddStationArea(
  body: API.StationAreaSaveDTO,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultStationAreaDTO>(`${apiPrefix}/v1/station-areas`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取电站分区 获取电站分区 GET /v1/station-areas/${param0} */
export async function stationAreaControllerImplShowStationArea(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.stationAreaControllerImplShowStationAreaParams,
  options?: { [key: string]: any },
) {
  const { area_id: param0, ...queryParams } = params;
  return request<API.ApiResultStationAreaDTO>(`${apiPrefix}/v1/station-areas/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 更新电站分区 更新电站分区 PUT /v1/station-areas/${param0} */
export async function stationAreaControllerImplUpdateStationArea(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.stationAreaControllerImplUpdateStationAreaParams,
  body: API.StationAreaSaveDTO,
  options?: { [key: string]: any },
) {
  const { area_id: param0, ...queryParams } = params;
  return request<API.ApiResultStationAreaDTO>(`${apiPrefix}/v1/station-areas/${param0}`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    params: { ...queryParams },
    data: body,
    ...(options || {}),
  });
}

/** 删除电站分区 删除电站分区 DELETE /v1/station-areas/${param0} */
export async function stationAreaControllerImplDeleteStationArea(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.stationAreaControllerImplDeleteStationAreaParams,
  options?: { [key: string]: any },
) {
  const { area_id: param0, ...queryParams } = params;
  return request<API.ApiResultVoid>(`${apiPrefix}/v1/station-areas/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}
